// 导入类型、接口、模块、组件、样式
import "./styles/reset.scss";
// import Page1 from "./pages/page1";
import Page2 from "./pages/page2";
import Login from "./pages/login";
import Index from "./pages/index";

const App = () => {
  // 一、获取路径
  const path = window.location.href.split("/").pop();

  // 二、返回不同组件数据
  return (
    <>
      {/* {path === "page1" && <Page1 />} */}
      {path === "page2" && <Page2 />}
      {path === "login" && <Login />}
      {["", "index"].includes(path as string) && <Index />}
    </>
  );
};

export default App;
